<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%> 
<%@ include file="/WEB-INF/jsp/struts/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="style/alternative.css" media="all" rel="stylesheet" />
<script type="text/javascript" src="script/prototype.js"></script>
<script type="text/javascript"  src="script/common.js"></script>
<style type="text/css">
#taskform {
    padding-left:0
}

#taskBox table {
    border:2px groove #CCC;
}

#taskBox td{
padding:2px;
border:1px solid #CCC;
white-space:normal;
background-color:#eee;
border:2px groove #369;
overflow:auto;
list-style-position:inside;
font-family:Arial, Helvetica, sans-serif;
font-size:1em;
line-height:1.2em;
}

#repeatTab ul { 
    padding-left:1em;
    list-style-position:inside;
    list-style-type:none;
}

</style>
<script language="Javascript">
function checkvalue() {
	return true;
}
function showDiv(divId) {
    document.getElementById(divId).style.display ="block";  
}
function hideDiv(divId) {
    document.getElementById(divId).style.display ="none";  
}
</script>
</head>
<body>
<c:set var="now" value="<%=new java.util.Date()%>" />
<c:choose>
<c:when test="${empty task}">
<c:set var="handler" value="task.htm?method=create" />
<c:set var="beginTime" value="${now}" />
<c:set var="deadline" value="${now}" />
<c:set var="duration" value="30" />
</c:when>
<c:otherwise>
<c:set var="handler" value="task.htm?method=update" />
<c:set var="beginTime" value="${task.beginTime}" />
<c:set var="deadline" value="${task.deadline}" />
<c:set var="duration" value="${task.duration}" />
</c:otherwise>
</c:choose>
<div id="content">
<div id="content_inner">
<form name="taskform" id="taskform" action="${handler}"  method="post" onsubmit="return(checkvalue());">
<!-- <div id="trail">* <a href="task.htm?method=list">任务管理</a> -&gt; 增加任务</div>
 -->
<br/>
<INPUT name="taskID" TYPE="hidden" value="${task.taskID}">
<TABLE  width="100%" cellspacing="4" cellpadding="4" id="taskBox" class="its">
<thead>
  <TR>
    <TH colspan="3" align="center"><strong>任务</strong></TH>
  </TR></thead>
<TR>
    <TD width="30%" align="right">任务名称</TD>
    <TD colspan="2" nowrap>${task.taskName}
    </TD>
</TR>
<TR>
    <TD align="right">任务描述</TD>
    <TD  colspan="2" nowrap>
    ${task.description}
    </TD>
</TR>
<TR>
    <TD align="right" width="30%">任务类型</TD>
    <TD width="30%">&nbsp;</TD>
<td width="30%" rowspan="9" align="center" valign="middle" id="repeatTab">
<div>把握生命中的每一天</div>
<br>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="clock" width="200" height="200" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="movie" value="images/newclock.swf">
        <param name="quality" value="high">
        <PARAM name="bgcolor" value="eeeeee">
        <param name="wmode" value="000000">
        <PARAM name="salign" VALUE="RL">
        
        
        <embed src="images/newclock.swf"  quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
        quality="high" bgcolor="eeeeee" align="middle" 
        allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="200" height="200"></embed>
    </object>
</td>
</TR>

<TR>
    <TD align="right">优先级</TD>
    <TD>重要且紧急</TD>
</TR>
<TR>
    <TD align="right">类别</TD>
    <TD>&nbsp;</TD>
</TR>
<TR>
    <TD align="right">环境</TD>
    <TD>&nbsp; </TD>
</TR>
<TR>
    <TD align="right">精力</TD>
    <TD>&nbsp;</TD>
</TR>
<TR>
    <TD align="right" nowrap>持续时间</TD>
    <TD>${duration} 分钟</TD>

</TR>
<TR>
    <TD align="right">开始时间</TD>
    <TD><fmt:formatDate value='${beginTime}' pattern='yyyy-MM-dd HH:mm:ss'/>
</TD>
</TR>
<TR>
    <TD align="right">结束时间</TD>
    <TD><fmt:formatDate value='${task.endTime}' pattern='yyyy-MM-dd HH:mm:ss'/>
</TD>
</TR>
<TR>
    <TD align="right">最后期限</TD>
    <TD><fmt:formatDate value='${deadline}' pattern='yyyy-MM-dd HH:mm:ss'/>

    </TD>

</TR>
<TR>
<TD align="right">
<c:choose>
<c:when test="${task.repeatID > 0}">
重复任务
</c:when>
<c:otherwise>
不重复
</c:otherwise>
</c:choose>
</TD>
<TD>
<c:if test="${task.repeatID > 0 and repeatInfo.repeatType == 'daily'}">
每${repeatInfo.interval}天  
${repeatInfo.startHour}:${repeatInfo.startMinute}:${repeatInfo.startSecond}
</c:if>

</TD>
<TD>
<c:choose>
<c:when test="${task.remindID > 0}">
需要提醒
</c:when>
<c:otherwise>
不要提醒
</c:otherwise>
</c:choose>
</TD>
</TR>
<TR>
    <TD align="right">子任务</TD>
    <TD colspan="2"> 无  
    <!-- div id="projectDiv">
    <ol id="subTaskList">
    <li>task1</li>
    <li>task2</li>
    <li>task3</li>
    </ol -->
    </div>
    </TD>
</TR>
<TR>
    <TD colspan="3" align="center" class="title">
    <INPUT name="action" TYPE="hidden" value="insert">
    <INPUT TYPE="button" id="finish" value="完成" onclick="javascript:location.href='task.htm?method=finish&taskID=${task.taskID}'">
    &nbsp;&nbsp;
    <INPUT TYPE="button" id="edit" value="编辑" onclick="javascript:location.href='task.htm?method=edit&taskID=${task.taskID}'">
    &nbsp;&nbsp;
    <INPUT TYPE="button" id="back" value="返回" onclick="javascript:history.back();"></TD>
</TR>
</TABLE>
</form>       

   </div><!-- end content_inner -->
</div><!-- end content -->